using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class StudyTipsEmailMap : EntityTypeConfiguration<StudyTipsEmail>
    {
        public StudyTipsEmailMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.email)
                .HasMaxLength(50);

            this.Property(t => t.city)
                .HasMaxLength(50);

            this.Property(t => t.url)
                .HasMaxLength(150);

            this.Property(t => t.FirstName)
                .HasMaxLength(50);

            this.Property(t => t.LastName)
                .HasMaxLength(50);

            this.Property(t => t.MobileTel)
                .HasMaxLength(50);

            this.Property(t => t.Country)
                .HasMaxLength(2);

            this.Property(t => t.School)
                .HasMaxLength(50);

            this.Property(t => t.CourseLevel)
                .HasMaxLength(50);

            this.Property(t => t.Etag)
                .HasMaxLength(100);

            this.Property(t => t.FormType)
                .HasMaxLength(50);

            this.Property(t => t.type)
                .HasMaxLength(50);

            this.Property(t => t.GAID)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("StudyTipsEmail");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.email).HasColumnName("email");
            this.Property(t => t.city).HasColumnName("city");
            this.Property(t => t.iskids).HasColumnName("iskids");
            this.Property(t => t.datesubmitted).HasColumnName("datesubmitted");
            this.Property(t => t.url).HasColumnName("url");
            this.Property(t => t.FirstName).HasColumnName("FirstName");
            this.Property(t => t.LastName).HasColumnName("LastName");
            this.Property(t => t.MobileTel).HasColumnName("MobileTel");
            this.Property(t => t.Country).HasColumnName("Country");
            this.Property(t => t.Birthdate).HasColumnName("Birthdate");
            this.Property(t => t.School).HasColumnName("School");
            this.Property(t => t.CourseLevel).HasColumnName("CourseLevel");
            this.Property(t => t.Comments).HasColumnName("Comments");
            this.Property(t => t.IsSubscribe).HasColumnName("IsSubscribe");
            this.Property(t => t.Etag).HasColumnName("Etag");
            this.Property(t => t.lastupdate).HasColumnName("lastupdate");
            this.Property(t => t.FormType).HasColumnName("FormType");
            this.Property(t => t.type).HasColumnName("type");
            this.Property(t => t.Age).HasColumnName("Age");
            this.Property(t => t.GAID).HasColumnName("GAID");
        }
    }
}
